<div class="module-head paneltitle">
	<div class="module-info">
		<p class="title titlefont">对接渠道</p>
	</div>
</div>

<div class="container-wrapper" width="1150px;">
	<div class="panel panel-default">
		<div class="panel-body">
			<ul class="nav nav-tabs nav-new">
		      <li ng-class="{'active': selectedTab==1}"><a ng-class="{'active2': selectedTab==1}" ng-click="selectTab(1)">正式包</a></li>
		      <li ng-class="{'active': selectedTab==2}"><a ng-class="{'active2': selectedTab==2}" ng-click="selectTab(2); ">灰度包</a></li>
		      <li ng-class="{'active': selectedTab==3}"><a ng-class="{'active2': selectedTab==3}" ng-click="selectTab(3)">插件包</a></li>
		    </ul>
			<form name="appForm" class="form-horizontal" ng-show="selectedTab=='1'" novalidate>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>应用名称：</label>
					<div class="col-sm-6 log-user-select">
						<select class="form-control" ng-model="appid" name="appid"
							ng-options="app.appid as app.appname for app in apps"
							required="required" ng-blur="checkAppid();" ng-change="getPlugfun(appid)">
							<option value="">-- 全部 --</option>
						</select> <label class="text-danger control-label"
							style="text-align: left;"
							ng-show="appidErrorMsg && appidErrorMsg!=''">
							{{appidErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">包地址：</label>
					<div class="col-sm-6 log-user-select">
						<label class="control-label" style="text-align: left;">
							{{component.componentPath}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">包名：</label>
					<div class="col-sm-6 log-user-select">
						<label class="control-label" style="text-align: left;">
							{{appName}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>应用icon：</label>
					<div class="col-sm-6 log-user-select">
						<input ng-show='flase' id="iconFiles" type="file" file-model="iconFiles" ng-model="iconFiles">
						<button class="btn btn-default" id="uploadIcon" ng-click="uploadIcon();">上传</button>
						<span id="validatorPic" style="display:none;">已选择</span><label
							class="text-danger control-label" style="text-align: left;"
							ng-show="iconErrorMsg && iconErrorMsg!=''">
							{{iconErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i> 包版本：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1.0.0" name="packversion" ng-model="packversion"
							required="required" ng-blur="checkPackversion();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="packversionErrorMsg && packversionErrorMsg!=''">
							{{packversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>包内版本：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1000" name="packnversion" ng-model="packnversion"
							required="required" ng-blur="checkPacknversion();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="packnversionErrorMsg && packnversionErrorMsg!=''">
							{{packnversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">排除升级版本：</label>
					<div class="col-sm-6 log-user-select">
						<textarea class="form-control" rows="3"
							placeholder="以英文逗号开头，结尾，版本间以英文逗号间隔" ng-model="upgradeversion"
							ng-blur="checkUpgradeversion();"></textarea>
							<label class="text-danger control-label" style="text-align: left;"
							ng-show="upgradeversionErrorMsg && upgradeversionErrorMsg !=''">
							{{upgradeversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>更新说明：</label>
					<div class="col-sm-6 log-user-select">
						<textarea class="form-control" rows="3" placeholder="最多200个字符"
							ng-model="remark" ng-blur="checkRemark();"></textarea>
						<label class="text-danger control-label" style="text-align: left;"
							ng-show="remarkErrorMsg && remarkErrorMsg!=''">
							{{remarkErrorMsg}} </label>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-10">
						<button class="btn btn-default" ng-click="goBack();" ng-disabled="isWaiting">取消</button>
						<button class="btn btn-default" ng-click="save();" ng-disabled="isWaiting">确认</button>
						<i class="fa fa-refresh fa-spin" ng-show="isWaiting"></i>
					</div>
				</div>
			</form>
			
			<form name="appForm" class="form-horizontal" ng-show="selectedTab=='2'" novalidate>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>应用名称：</label>
					<div class="col-sm-6 log-user-select">
						<select class="form-control" ng-model="appid" name="app"
							ng-options="app.appid as app.appname for app in apps"
							required="required" ng-blur="checkAppid();" ng-change="getPlugfun(appid)">
							<option value="">-- 全部 --</option>
						</select> <label class="text-danger control-label"
							style="text-align: left;"
							ng-show="appidErrorMsg && appidErrorMsg!=''">
							{{appidErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">包地址：</label>
					<div class="col-sm-6 log-user-select">
						<label class="control-label" style="text-align: left;">
							{{component.componentPath}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">包名：</label>
					<div class="col-sm-6 log-user-select">
						<label class="control-label" style="text-align: left;">
							{{appName}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>应用icon：</label>
					<div class="col-sm-6 log-user-select">
						<button class="btn btn-default" id="uploadIcon" ng-click="uploadIcon();">上传</button>
						<span id="validatorPic2" style="display:none;">已选择</span><label
							class="text-danger control-label" style="text-align: left;"
							ng-show="iconErrorMsg && iconErrorMsg!=''">
							{{iconErrorMsg}} </label>
						
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">PLIST（bundle-identifier）：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：SuningEBuyBeta" name="bIdentifier" ng-model="bIdentifier"
							ng-blur="checkBIdentifier();"><label
							class="text-danger control-label" style="text-align: left;"
							ng-show="bIdentifierValueErrorMsg && bIdentifierValueErrorMsg !=''">
							{{bIdentifierValueErrorMsg}} </label>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">PLIST（bundle-version）：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1.0.0" name="bVersion" ng-model="bVersion"
							ng-blur="checkBVersion();"><label
							class="text-danger control-label" style="text-align: left;"
							ng-show="bVersionValueErrorMsg && bVersionValueErrorMsg !=''">
							{{bVersionValueErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i> 包版本：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1.0.0" name="packversion" ng-model="packversion"
							required="required" ng-blur="checkPackversion();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="packversionErrorMsg && packversionErrorMsg!=''">
							{{packversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>包内版本：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1000" name="packnversion" ng-model="packnversion"
							required="required" ng-blur="checkPacknversion();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="packnversionErrorMsg && packnversionErrorMsg!=''">
							{{packnversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">排除升级版本：</label>
					<div class="col-sm-6 log-user-select">
						<textarea class="form-control" rows="3"
							placeholder="以英文逗号开头，结尾，版本间以英文逗号间隔" ng-model="upgradeversion"
							ng-blur="checkUpgradeversion();"></textarea>
							<label class="text-danger control-label" style="text-align: left;"
							ng-show="upgradeversionErrorMsg && upgradeversionErrorMsg !=''">
							{{upgradeversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>更新说明：</label>
					<div class="col-sm-6 log-user-select">
						<textarea class="form-control" rows="3" placeholder="最多200个字符"
							ng-model="remark" ng-blur="checkRemark();"></textarea>
						<label class="text-danger control-label" style="text-align: left;"
							ng-show="remarkErrorMsg && remarkErrorMsg!=''">
							{{remarkErrorMsg}} </label>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>灰度量：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							 name="quantitynum" ng-model="quantitynum"
							required="required" ng-blur="checkQuantitynum();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="quantitynumErrorMsg && quantitynumErrorMsg!=''">
							{{quantitynumErrorMsg}} </label>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-10">
						<button class="btn btn-default" ng-click="goBack();" ng-disabled="isWaiting">取消</button>
						<button class="btn btn-default" ng-click="saveGrayPackage();" ng-disabled="isWaiting">确认</button>
						<i class="fa fa-refresh fa-spin" ng-show="isWaiting"></i>
					</div>
				</div>
			</form>
			
			<form name="appForm" class="form-horizontal" ng-show="selectedTab=='3'" novalidate>
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>应用名称：</label>
					<div class="col-sm-6 log-user-select">
						<select class="form-control" ng-model="appid" name="appid"
							ng-options="app.appid as app.appname for app in apps"
							required="required" ng-blur="checkAppid();" ng-change="getPlugfun(appid)">
							<option value="">-- 全部 --</option>
						</select> <label class="text-danger control-label"
							style="text-align: left;"
							ng-show="appidErrorMsg && appidErrorMsg!=''">
							{{appidErrorMsg}} </label>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>功能名称：</label>
					<div class="col-sm-6 log-user-select">
						<select class="form-control" ng-model="plugfunid" name="plugfunid"
							ng-options="plugfun.funid as plugfun.funname for plugfun in plugfuns"
							required="required" ng-blur="checkPlugfunid();">
							<option value="">-- 全部 --</option>
						</select> <label class="text-danger control-label"
							style="text-align: left;"
							ng-show="plugfunidErrorMsg && plugfunidErrorMsg!=''">
							{{plugfunidErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">包地址：</label>
					<div class="col-sm-6 log-user-select">
						<label class="control-label" style="text-align: left;">
							{{component.componentPath}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">包名：</label>
					<div class="col-sm-6 log-user-select">
						<label class="control-label" style="text-align: left;">
							{{appName}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i> 包版本：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1.0.0" name="packversion" ng-model="packversion"
							required="required" ng-blur="checkPackversion();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="packversionErrorMsg && packversionErrorMsg!=''">
							{{packversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall"><i
						style="color: red">*</i>包内版本：</label>
					<div class="col-sm-6 log-user-select">
						<input type="text" class="form-control" maxlength="20"
							placeholder="例如：1000" name="packnversion" ng-model="packnversion"
							required="required" ng-blur="checkPacknversion();"> <label
							class="text-danger control-label" style="text-align: left;"
							ng-show="packnversionErrorMsg && packnversionErrorMsg!=''">
							{{packnversionErrorMsg}} </label>
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label" for="formGroupInputSmall">升级版本：</label>
					<div class="col-sm-6 log-user-select">
						<textarea class="form-control" rows="3"
							placeholder="以英文逗号开头，结尾，版本间以英文逗号间隔" ng-model="upgradeversion"
							ng-blur="checkUpgradeversion();"></textarea>
							<label class="text-danger control-label" style="text-align: left;"
							ng-show="upgradeversionErrorMsg && upgradeversionErrorMsg !=''">
							{{upgradeversionErrorMsg}} </label>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-3 col-sm-10">
						<button class="btn btn-default" ng-click="goBack();" ng-disabled="isWaiting">取消</button>
						<button class="btn btn-default" ng-click="savePlugPackage();" ng-disabled="isWaiting">确认</button>
						<i class="fa fa-refresh fa-spin" ng-show="isWaiting"></i>
					</div>
				</div>
			</form>
			
		</div>
	</div>
</div>
